From 08355997c2666fee0d54f0eb8316f99b0087fac8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Tue, 14 Feb 2017 13:23:08 +0100 Subject: [PATCH] snapshot: Avoid a double-free We can't pass the same string to two different snapshot states since removing one of them will free the passed string, so just create another one for the second state. --- gtk/gtksnapshot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index 7b8bfddf68..77146e4baf 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -742,7 +742,7 @@ gtk_snapshot_push_blend (GtkSnapshot *snapshot, state->data.blend.bottom_node = NULL; state = gtk_snapshot_state_new (state, - str, + g_strdup (str), state->clip_region, state->translate_x, state->translate_y, @@ -863,7 +863,7 @@ gtk_snapshot_push_cross_fade (GtkSnapshot *snapshot, state->data.cross_fade.start_node = NULL; state = gtk_snapshot_state_new (state, - str, + g_strdup (str), state->clip_region, state->translate_x, state->translate_y, -- 2.30.2